<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <!-- 引入element-ui样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <style>

    </style>
</head>
<body>
<div id="Informed">
    <h2>知情同意书</h2>
    <el-row>
        <el-col :span="8">
            <h3>上传</h3>
            <el-upload class="upload-demo" drag action="http://192.168.80.9:8080/medical/informed/uploadInformed" multiple accept=".pdf">
                <i class="el-icon-upload"></i>
                <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
                <div class="el-upload__tip" slot="tip">ps: 知情同意书只能上传pdf文件，且不超过500kb</div><p></p>
                <div class="el-upload__tip" slot="tip">    若需使用最新上传文件，请刷新本页面~~~~~~~</div><p></p>
            </el-upload>
        </el-col>

        <el-col :span="8">
            <el-form ref="form" label-width="100px">
                <h3>浏览或下载</h3>
                <el-form-item label="知情通知书">
                    <el-select v-model="Informed.InformedSrc" placeholder="请选择知情通知书" @change="getInformed">
                        <el-option :label="i.informedConsentName" :value="i.informedConsentSrc" v-for="i in Informeds"></el-option>
                    </el-select>
                </el-form-item>
            </el-form>
        </el-col>
    </el-row>
</div>


<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>

<script>
    var app = new Vue({
        el: "#Informed",
        data: {
            Informed: {
                InformedId: "",
                InformedName: "",
                InformedSrc:"",
            },
            Informeds:[],

        },
        created() {
            var t = this;
            axios.get('http://192.168.80.13:8080/medical/informed/selectAllInformed', {
                params: {}
            }).then(function(data) {
                t.Informeds = data.data.data
            }).catch(function(Error) {
                console.log(Error)
            })

        },
        methods: {
            //根据选中的检查类别，列出对应的小类别
            getInformed: function() {
                var tempwindow=window.open('_blank');
                tempwindow.location=this.Informed.InformedSrc;
            },
        },

    })
</script>


</body>
</html>
